import re
# 列表每个元素的路径
# print(re.sub(r'\\n|\\r|\\',"","\\r\\n \\"))
# mystr=": 日期是 2018年10月23日"
# print(re.search(r"(\d{4})-(\d{1,2})-(\d{1,2})|(\d{4})/(\d{1,2})/(\d{1,2})|(\d{4})年(\d{1,2})月(\d{1,2})",mystr).group())
# mystr=re.search(r"(\d{4})-(\d{1,2})-(\d{1,2})|(\d{4})/(\d{1,2})/(\d{1,2})|(\d{4})年(\d{1,2})月(\d{1,2})",mystr).group()
# mystr=re.sub(r'/|年|月|日',"-",mystr)
# print(mystr)
LIST_XPATH_DIC={
    "https://ggglxy.scu.edu.cn":"//ul[@class='zy_listul']/li",
    "https://www.hxkq.org":"//ul[@class='column_list mt20']/li",
    "https://yz.scu.edu.cn/":"//ul[@class='data-list']/li",
    "http://xsc.scu.edu.cn":"//div[@class='news-list']/ul/li",
    "https://ccs.scu.edu.cn":"//div[@class='zxdt-list']/ul/li",
    "https://lj.scu.edu.cn":"//div[@class='sList']/ul/li",
    "https://artmuseum.scu.edu.cn":"//div[@class='slideBox']/ul/li",
    "https://eie.scu.edu.cn":"//ul[@class='list_c cleafix']/li",
    "http://historytourism.scu.edu.cn":"//div[@class='h-list']/ul/li",
    "https://law.scu.edu.cn":"//div[@class='News']/ol/li",
    "https://mse.scu.edu.cn":"//div[@class='xwbox']/ul",
    "https://ee.scu.edu.cn":"//div[@class='middle-content fl']/ul/li",
    "https://pharmacy.scu.edu.cn":"//ul[@class='xj_r_ul01']/li",
    "https://wcsph.scu.edu.cn":"//div[@class='list']/ul/li",
    "https://chem.scu.edu.cn":"//div[@class='list']/ul/li",
    "https://ce.scu.edu.cn":"//div[@class='list']/ul/li",
    "https://acem.scu.edu.cn":"//div[@class='neirong']/div/span[@class='title2']",
    "https://sesu.scu.edu.cn":"//ul[@class='list-colf3']/li",
    "https://life.scu.edu.cn":"//div[@class='sList']/ul/li"
}

# 列表每个元素里的Url的路径
LIST_XPATH_URL_DIC={
    "https://ggglxy.scu.edu.cn":"h3/a/@href",
    "https://www.hxkq.org":"a/@href",
    "https://yz.scu.edu.cn/":"span/a/@href",
    "http://xsc.scu.edu.cn": "a/@href",
    "https://ccs.scu.edu.cn": "a/@href",
    "https://lj.scu.edu.cn":"h3/a/@href",
    "https://artmuseum.scu.edu.cn":"a/@href",
    "https://eie.scu.edu.cn":"a/@href",
    "http://historytourism.scu.edu.cn":"a/@href",
    "https://law.scu.edu.cn":"a/@href",
    "https://mse.scu.edu.cn":"li/a/@href",
    "https://ee.scu.edu.cn":"a/@href",
    "https://pharmacy.scu.edu.cn":"a/@href",
    "https://wcsph.scu.edu.cn":"a/@href",
    "https://chem.scu.edu.cn":"a/@href",
    "https://ce.scu.edu.cn":"a/@href",
    "https://acem.scu.edu.cn":"a/@href",
    "https://sesu.scu.edu.cn":"a/@href",
    "https://life.scu.edu.cn":"a/@href"
}

PAGE_XPATH_TITLE={
    "https://ggglxy.scu.edu.cn":"//div[@class='detail_zy_title']/h1/text()",
    "https://www.hxkq.org":"//h1[@class='article_title']/font/text()",
    "https://yz.scu.edu.cn/": "//h3[@class='content-title']/text()",
    "http://xsc.scu.edu.cn": "//div[@class='news-title']/p/text()",
    "https://ccs.scu.edu.cn": "//div[@class='xwdt']/text()",
    "https://lj.scu.edu.cn": "//form[@name='_newscontent_fromname']/h2/text()",
    "https://artmuseum.scu.edu.cn": "//h1[@class='Title']/text()",
    "https://eie.scu.edu.cn":"//div[@class='content']/h1/text()",
    "http://historytourism.scu.edu.cn":"//div[@class='col-md-12 article-title']/h4/text()",
    "https://law.scu.edu.cn":"//form[@name='_newscontent_fromname']/h2/text()",
    "https://mse.scu.edu.cn":"//div[@class='title']/text()",
    "https://ee.scu.edu.cn":"//div[@class='title']/h1/text()",
    "https://pharmacy.scu.edu.cn":"//div[@class='xjxs_tit01']/text()",
    "https://wcsph.scu.edu.cn":"//div[@class='show']/h2/text()",
    "https://chem.scu.edu.cn":"//p[@class='title']/text()",
    "https://ce.scu.edu.cn":"//div[@class='show']/h2/text()",
    "https://acem.scu.edu.cn":"//div[@class='listtitle']/text()",
    "https://sesu.scu.edu.cn":"//form[@name='_newscontent_fromname']/h2/text()",
    "https://life.scu.edu.cn":"//div[@class='show']/h2/text()"
}

PAGE_XPATH_SUBDATE={
    "https://ggglxy.scu.edu.cn":"//div[@class='detail_zy_title']/p/text()",
    "https://www.hxkq.org":"//div[@class='sub_tit']/span[@class='time']/text()",
    "https://yz.scu.edu.cn/": "//p[@class='add-time']/text()",
    "http://xsc.scu.edu.cn": "//div[@class='news-title']/p[@class='author']/text()",
    "https://ccs.scu.edu.cn": "//p[@class='tit-p']/text()",
    "https://lj.scu.edu.cn": "//form[@name='_newscontent_fromname']/p/span/text()",
    "https://artmuseum.scu.edu.cn": "//*[@id='subTitle']/b[2]",
    "https://eie.scu.edu.cn":"//div[@class='author']/text()",
    "http://historytourism.scu.edu.cn":"//div[@class='title-desc col-md-12 text-center']/span[1]/text()",
    "https://law.scu.edu.cn":"//p[@class='subTime']/text()",
    "https://mse.scu.edu.cn":"//div[@class='time1']/text()",
    "https://ee.scu.edu.cn":"//div[@class='label']/text()",
    "https://pharmacy.scu.edu.cn":"//div[@class='xjxs_tit02']/text()",
    "https://wcsph.scu.edu.cn":"//p[@class='sTime']/text()",
    "https://chem.scu.edu.cn":"//p[@class='info']/text()",
    "https://ce.scu.edu.cn":"//p[@class='sTime']/text()",
    "https://acem.scu.edu.cn":"//div[@class='info']/text()",
    "https://sesu.scu.edu.cn":"//div[@class='time-more']/text()",
    "https://life.scu.edu.cn":"//p[@class='sTime']/text()"
}

PAGE_XPATH_CONTENT={
    "https://ggglxy.scu.edu.cn":"//div[@class='v_news_content']",
    "https://www.hxkq.org":"//div[@class='article_cont']",
    "https://yz.scu.edu.cn/": "//div[@class='content-box']",
    "http://xsc.scu.edu.cn": "//div[@class='news-content']",
    "https://ccs.scu.edu.cn": "//div[@class='v_news_content']",
    "https://lj.scu.edu.cn": "//div[@class='v_news_content']",
    "https://artmuseum.scu.edu.cn": "//div[@class='v_news_content']",
    "https://eie.scu.edu.cn":"//div[@class='content_c']",
    "http://historytourism.scu.edu.cn":"//div[@class='col-md-12 main-content']",
    "https://law.scu.edu.cn":"//div[@class='v_news_content']",
    "https://mse.scu.edu.cn":"//div[@class='v_news_content']",
    "https://ee.scu.edu.cn":"//div[@class='v_news_content']",
    "https://pharmacy.scu.edu.cn":"//div[@class='v_news_content']",
    "https://wcsph.scu.edu.cn":"//div[@class='v_news_content']",
    "https://chem.scu.edu.cn":"//div[@class='v_news_content']",
    "https://ce.scu.edu.cn":"//div[@class='v_news_content']",
    "https://acem.scu.edu.cn":"//div[@class='v_news_content']",
    "https://sesu.scu.edu.cn":"//div[@class='list-page']",
    "https://life.scu.edu.cn":"//div[@class='sMid']"
}
